package com.hyc.myvideo.ui.activity.home;

import android.view.View;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.TextView;

import com.handmark.pulltorefresh.library.PullToRefreshScrollView;
import com.hyc.myvideo.R;
import com.hyc.myvideo.ui.base.BaseFActivity;

import butterknife.BindView;
import butterknife.OnClick;


/**
 * 图文详情
 * Created by dfeads on 2017/7/27.
 */

public class HomeDetailActivity extends BaseFActivity {
  @BindView(R.id.head_center_title) TextView mCenterTitle;
  @BindView(R.id.activity_home_detail_pull_to_refresh) PullToRefreshScrollView mPullToRefresh;

  @Override public int getContentViewId() {
    return R.layout.activity_home_detail;
  }

  @Override protected void initView() {
    setLeftBtnClick(true,"图文");
    setRightClick(R.mipmap.audio_share, new View.OnClickListener() {
      @Override public void onClick(View view) {

      }
    });
    View view=getLayoutInflater().inflate(R.layout.layout_home_detail,null);
    WebView webView= (WebView) view.findViewById(R.id.layout_home_detail_web);
    WebSettings webSetting = webView.getSettings();
    //支持js
    webSetting.setJavaScriptEnabled(true);
    webSetting.setBuiltInZoomControls(false);
    //支持对网页缩放
    webSetting.setSupportZoom(false);
    mPullToRefresh.addView(view);
    webView.loadUrl("https://www.baidu.com/");

  }

  @Override protected void initData() {
  }

  @Override protected void oNext(String resulte, String method) {

  }

  @Override
  protected void oError() {

  }

  @OnClick(R.id.head_right_img) public void onViewClicked() {
  }
}
